package com.molichuxing.services.infrastructure.dao;

import com.molichuxing.framework.dao.RootMapper;
import com.molichuxing.services.business.dto.response.VehicleNameBizDto;
import com.molichuxing.services.infrastructure.bean.VehicleBean;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * <p>
 * 车型 Mapper 接口
 * </p>
 *
 * @author
 * @since 2019-08-12
 */
public interface VehicleMapper extends RootMapper<VehicleBean> {

    VehicleBean getVehicleById(int vehicleId);

    VehicleBean getVehicleByName(String vehicleName);

    List<VehicleBean> getVehicleList(@Param("vehicleModleId") int vehicleModleId);

    List<VehicleBean> getVehicleListByIds(@Param("vehicleModleId") int vehicleModleId, @Param("vehicleIds") List<Integer> vehicleIds);

    long getPageCount(@Param("params") Map<String, Object> params);

    List<VehicleBean> getPage(@Param("params") Map<String, Object> params, @Param("pageNum") int pageNum,
                              @Param("pageSize") int pageSize);

    /**
     * 获取所有车型信息（包含车系、品牌）
     *
     * @return
     */
    List<VehicleNameBizDto> getAllVehicleMake();
}
